import {configureStore} from '@reduxjs/toolkit';
import rootReducer from './root';

export const createStore = () => {
    const store = configureStore({
        reducer: {
            root: rootReducer
        }
    });
    return store;
};

export type StoreType = ReturnType<typeof createStore>
export type RootState = ReturnType<StoreType['getState']>
